package orbito.entity;

public abstract class Entity {
	
	private static int nameCounter = 0;
	
	/**
	 * The unique name of the entity.
	 */
	protected String name;
	
	public Entity() {
		this.name = "Entity" + nameCounter++;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getName() {
		return this.name;
	}
	
	public String toString() {
		return this.name;
	}
	
	/**
	 * Performs a simulation step. When called, should advance the state of this 
	 * entity from time t to time t+dt.
	 * 
	 * @param t The simulation time before the step, in seconds.
	 * @param dt The time that passes during this step, in seconds.
	 */
	public abstract void step(double t, double dt);
}